<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title>title</title>
		<link rel="stylesheet" type="text/css" href="../css/api.css"/>
		<link rel="stylesheet" type="text/css" href="../css/aui.css"/>
		<style>
			body {
			}
			.aui-input-row {
				width: 100%;
			}
			#content {
				height: 150px;
			}
			.aui-form {
				margin-bottom: 10px;
			}
			.presshover {
				background-color: #55AAAA;
			}
		</style>
	</head>
	<body>
		<div class="aui-form">
			<div class="aui-input-row">
				<label class="aui-input-addon">事件类型</label>
				<div class="aui-input-row">
					<input type="text" class="aui-input" readonly="true" id="txtCaseType"/>
				</div>
			</div>
		</div>
		<div class="aui-content">
			<div class="aui-input-row">
				<span class="aui-input-addon" style="margin-left: 5px">违法描述</span>
			</div>
			<div class="aui-input-row">
				<textarea name="content" class="aui-input" id="txtWFDesc" placeholder="违法描述" readonly="true" style="height: 80px"></textarea>
			</div>
		</div>
		<div class="aui-content">
			<div class="aui-input-row">
				<label class="aui-input-addon">处理意见</label>
			</div>
			<div class="aui-input-row">
				<textarea name="content" class="aui-input" id="txtCLYJ" placeholder="处理意见" readonly="true" style="height: 80px"></textarea>
			</div>
		</div>
		<div class="aui-content">
			<div class="aui-input-row">
				<span class="aui-input-addon" style="margin-left: 5px">处理时间</span>
				<input type="text" class="aui-input" readonly="true" id="txtCLSJ"/>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="../script/api.js"></script>
	<script src="../script/jquery.min.js"></script>
	<script src="../script/jquery.sha1.js"></script>
	<script type="text/javascript" src="../script/common.js"></script>
	<script type="text/javascript">
		apiready = function() {
		var caseId=api.pageParam.param;
		api.getPrefs({
						key : 'token'
					}, function(ret, err) {
						var token = ret.value;
						if (token && token != "") {
							getCaseInfo(caseId, token);
						}
					})
		};
		
		function getCaseInfo(caseId, token) {
			$.ajax({
				url : siteUrl + 'AjaxHandler.ashx?class=AjaxCaseInfo&method=GetCaseInfo',
				type : 'POST',
				data : {
					caseId : caseId
				},
				headers : {
					"X-APICloud-Appkey" : getAppKeyInSha1(),
					"Token" : token
				},
				success : function(json) {
					if (json != null) {
						if (json.CLSJ != null && json.CLSJ != '') {
							var tmpTime = parseJsDateTime(json.CLSJ);
							json.CLSJ = formatDateToStandard(tmpTime, '120');
							$("#txtCLSJ").val(json.CLSJ);
						}
						
						$("#txtCaseType").val(json.WFZT);
						$("#txtWFDesc").val(json.WFDESC);
						$("#txtCLYJ").val(json.DEALDESC);
					}
				},
				error : function(e) {
				api.toast({
						msg : '获取数据失败',
						location : 'middle'
					});
//					alert("获取数据失败：" + e);
				},
				cache : false
			})
		}
	</script>
</html>